% This function generates a n addative colors space with
% a maximal of k additions
function space = generateAddativeColorSpace(colors, k)

numOfColors = size(colors,1);

inds = npermutek(1:numOfColors, k);

newcolors = [];
for idx=1:size(inds,1)
   newcolor =  sum(colors(inds(idx,:),:));
   newcolors = [newcolors; newcolor];
end

space = newcolors;

